from ppgnss import gnss_geodesy

x, y, z =  -2819033.9747, 4740708.2830, 3192325.4737
x1, y1, z1 = -2818746.2097, 4740658.2514,  3192661.7268

lat, lon, hgt = gnss_geodesy.xyz2blh(x, y, z, "cgcs2000")
lat1, lon1, hgt1 = gnss_geodesy.xyz2blh(x1, y1, z1, "cgcs2000")
print(lat, lon, hgt, lat1, lon1, hgt1)

n, e, u = gnss_geodesy.dxyz2neu([x1-x, y1-y, z1-z], [x, y, z], "cgcs2000")
print(n, e, u)

newx, newy, newz = gnss_geodesy.blh2xyz(lat, lon, hgt)
newx1, newy1, newz1 = gnss_geodesy.blh2xyz(lat1, lon1, hgt1)
print(newx, newy, newz, x, y, z)
print(newx1, newy1, newz1, x1, y1, z1)
